#ifndef SOLUTION_H
#define SOLUTION_H

#include <QtGui/QMainWindow>
#include "ui_solution.h"
#include "fabric.h"
#include "include.h"

class Solution : public QMainWindow
{
    Q_OBJECT

public:
    Solution(Fabric, QWidget *parent = 0);
    ~Solution();
    
protected:
	void paintEvent(QPaintEvent *);
	void resizeEvent(QResizeEvent *);
	void mousePressEvent(QMouseEvent *);
	void mouseMoveEvent(QMouseEvent *);
	void mouseReleaseEvent(QMouseEvent *);
	
private slots:
	void option_checked();
	void save_solution();

private:
    Ui::SolutionClass ui;
    Fabric fabric_solution;
    QImage buffer, solution;
    int buffer_x, buffer_y;
    QPoint position_point;
    
    void setupConnections();
    void drawSolution();
};

#endif // SOLUTION_H
